Electronic devices such as cell phones often include a number of mechanical buttons mounted on housings of the electronic devices. The buttons and the housings are often made of metal. During testing, the housings can be shook to touch or rub the buttons, thus the buttons resonates with the housings to produce a noise.